﻿
/*
#**************************************************************************
#  openSIS is a student information system for public and non-public 
#  schools from Open Solutions for Education, Inc. web: www.os4ed.com
#
#  openSIS is  web-based, open source, and comes packed with features that 
#  include student demographic info, scheduling, grade book, attendance, 
#  report cards, eligibility, transcripts, parent portal, 
#  student portal and more.   
#
#  Visit the openSIS web site at http://www.opensis.com to learn more.
#  If you have question regarding this system or the license, please send 
#  an email to info@os4ed.com.
#
#  This program is released under the terms of the GNU General Public License  
#  as  published by the Free Software Foundation, version 2 of the License. 
#  See license.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#**************************************************************************** 

*/

function OpenHideDivision(idFirst,idSecond) 
{
    var divisionFirst = document.getElementById(idFirst);
    var divisionSecond = document.getElementById(idSecond);
    if (divisionFirst.style.display == 'block')
    {
        divisionFirst.style.display = 'none';
    }
    else
    {
        divisionFirst.style.display = 'block';
    }
    divisionSecond.style.display = 'none';
}

function GridCheckBoxSelection(culture) {
   
    var checked = 0;
    var sessionValue = culture;

 
    for (i = 0; i < document.aspnetForm.elements.length; i++) 
    {
        if (document.aspnetForm.elements[i].name.indexOf("chkrow") > -1) 
        {
            if (document.aspnetForm.elements[i].checked == true) 
            {
                var checked = checked + 1;
               
            }

        }
    }
    if (checked > 1)
     {

         for (j = 0; j < document.aspnetForm.elements.length; j++)
         {
             if (document.aspnetForm.elements[j].name.indexOf("chkrow") > -1)
              {
                 document.aspnetForm.elements[j].checked = false;
             }

         }

         
      
            if(sessionValue=="en-US") {
                    alert('Please select only one row');
             }
            if(sessionValue=="es-MX"){
                alert('Por favor, elija sólo una fila');
            }
            if (sessionValue == "it-IT") {
                alert('Si prega di selezionare solo uno riga');
            }
            if (sessionValue == "de-DE") {
                alert('Bitte wählen Sie nur eine Zeile');
            }
            if (sessionValue == "fr-FR") {
                alert('vous plaît sélectionnez uniquement une rang');
            }
            if (sessionValue == "ru-RU") {
                alert('Пожалуйста, выберите только одну строку');
            }
            if (sessionValue == "pt-BR") {
                alert('agradar Selecione apenas uma fila');
            }
            if (sessionValue == "ja-JP") {
                alert('つだけ行を選択してください');
            }
            if (sessionValue == "ko-KR") {
                alert('제발 하나만 행을 선택 ');
            }
            if (sessionValue == "ar-SA") {
                alert('من فضلك رتخا فقط واحد صف');
            }
            if (sessionValue == "zh-CN") {
                alert('请仅选择一列行');
            }
          
        return false;


    }

    //*******

    else if (checked == 0) {


    //alert('Please select atleast one row');

    if (sessionValue == "en-US") {
        alert('Please select atleast one row');
    }
    if (sessionValue == "es-MX") {
        alert('Por favor, seleccione al menos una fila');
    }
    if (sessionValue == "it-IT") {
        alert('Si prega di selezionare almeno uno riga');
    }
    if (sessionValue == "de-DE") {
        alert('Bitte wählen Sie mindestens eine Zeile');
    }
    if (sessionValue == "fr-FR") {
        alert('vous plaît sélectionner au moins une rangée');
    }
    if (sessionValue == "ru-RU") {
        alert('Пожалуйста, выберите по крайней мере одну строку');
    }
    if (sessionValue == "pt-BR") {
        alert('agradar Selecione pelo menos uma fila');
    }
    if (sessionValue == "ja-JP") {
        alert('どうぞ選択少なくとも一つ行');
    }
    if (sessionValue == "ko-KR") {
        alert('이상이어야 하나의 행을 선택하시기 바랍니다 ');
    }
    if (sessionValue == "ar-SA") {
        alert('من فضلك رتخا على الأقل واحد صف');
    }
    if (sessionValue == "zh-CN") {
        alert('请选择至少一个行');
    }
        
        
        return false;
    }

    toolTip('');

}

function SelectDeselectAllCheckboxes(spanChk) {
    
      var oItem = spanChk.children;
      
      var theBox = (spanChk.type == "checkbox") ? spanChk : spanChk.children.item[0];
     
      xState = theBox.checked;
      
      elm = theBox.form.elements;

//      for (i = 0; i < elm.length; i++)
//          
//          if (elm[i].type == "checkbox" && elm[i].id != theBox.id) {
//              alert(elm[i].type);
//              if (elm[i].checked != xState)
//                  
//              elm[i].click();
//
      //      }

      for (j = 0; j < document.aspnetForm.elements.length; j++) {
          if (document.aspnetForm.elements[j].name.indexOf("chkrow") > -1) {
              
              document.aspnetForm.elements[j].checked = xState;
          }
      }

  }

  //****************************Sabya(30/6/09)***********************************

  function hidePopup(modalpopup) {
     
      var modalPopup = $find(modalpopup);
     
      modalPopup.hide();
  }

  function Validation(Title, Notes, StDate, EndDate, Msg, culture) {

      
      if (document.getElementById(Title).value == "") {

          if (culture == "en-US") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Enter Title</DIV>";
          }
          if (culture == "es-MX") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Introduzca Título</DIV>";
          }
          if (culture == "it-IT") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Inserisci titolo</DIV>";
          }
          if (culture == "de-DE") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Geben Sie Titel</DIV>";
          }
          if (culture == "fr-FR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Entrez Titre</DIV>";
          }
          if (culture == "ru-RU") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>вводить заголовок</DIV>";
          }
          if (culture == "pt-BR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Digite Título</DIV>";
          }
          if (culture == "ja-JP") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>タイトルを入力します</DIV>";
          }
          if (culture == "ko-KR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>입력 제목</DIV>";
          }
          if (culture == "ar-SA") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>أدخل عنوان</DIV>";
          }
          if (culture == "zh-CN") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>输入标题</DIV>";
          }
          return false;
      }


      if (document.getElementById("wysiwyg" + Notes).contentWindow.document.body.innerHTML == "") {
          
          if (culture == "en-US") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Enter Notes</DIV>";
          }
          if (culture == "es-MX") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Introduzca Notas</DIV>";
          }
          if (culture == "it-IT") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>entrare Note</DIV>";
          }
          if (culture == "de-DE") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Geben Sie stellt fest</DIV>";
          }
          if (culture == "fr-FR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Entrez Notes</DIV>";
          }
          if (culture == "ru-RU") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Введите Примечания</DIV>";
          }
          if (culture == "pt-BR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Digite Notas</DIV>";
          }
          if (culture == "ja-JP") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>エンターノート</DIV>";
          }
          if (culture == "ko-KR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>입학시키다노트</DIV>";
          }
          if (culture == "ar-SA") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>ويلاحظ دخول</DIV>";
          }
          if (culture == "zh-CN") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>输入笔记</DIV>";
          }
          return false;
      }
      else {
          document.getElementById('ctl00_ContentPlaceHolder1_hdnNoteEditor').value = document.getElementById("wysiwyg" + Notes).contentWindow.document.body.innerHTML
      }

      if (document.getElementById(StDate).value == "") {

         
          if (culture == "en-US") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Enter Start Date</DIV>";
          }
          if (culture == "es-MX") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Escriba Fecha de inicio</DIV>";
          }
          if (culture == "it-IT") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Inserisci Data di inizio</DIV>";
          }
          if (culture == "de-DE") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Geben Sie Start Datum</DIV>";
          }
          if (culture == "fr-FR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Entrez Date de début</DIV>";
          }
          if (culture == "ru-RU") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Введите Дата начала</DIV>";
          }
          if (culture == "pt-BR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Digite Data de Início</DIV>";
          }
          if (culture == "ja-JP") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>エンター開始日付</DIV>";
          }
          if (culture == "ko-KR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>시작 날짜를 입력합니다</DIV>";
          }
          if (culture == "ar-SA") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>أدخل تاريخ البدء</DIV>";
          }
          if (culture == "zh-CN") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>输入起始日期</DIV>";
          }
          return false;
      }
      if (document.getElementById(EndDate).value == "") {
         
          if (culture == "en-US") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Enter End Date</DIV>";
          }
          if (culture == "es-MX") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Escriba Fecha de término</DIV>";
          }
          if (culture == "it-IT") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Inserisci Fine Data</DIV>";
          }
          if (culture == "de-DE") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Geben Sie Ende Datum</DIV>";
          }
          if (culture == "fr-FR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Entrez Fin Date</DIV>";
          }
          if (culture == "ru-RU") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Введите Дата окончания</DIV>";
          }
          if (culture == "pt-BR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Digite Data Final</DIV>";
          }
          if (culture == "ja-JP") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>エンター終わり日付</DIV>";
          }
          if (culture == "ko-KR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>끝 날짜를 입력합니다</DIV>";
          }
          if (culture == "ar-SA") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>أدخل تاريخ الانتهاء</DIV>";
          }
          if (culture == "zh-CN") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>输入结束日期</DIV>";
          }
          return false;
      }



      var checked = 0;
      for (i = 0; i < document.aspnetForm.elements.length; i++) {
          if (document.aspnetForm.elements[i].name.indexOf("chkVisibleUser") > -1) {
              if (document.aspnetForm.elements[i].checked == true) {
                  var checked = checked + 1;

              }

          }
      }
      if (checked == 0) {

          if (culture == "en-US") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Select any User</DIV>";
          }
          if (culture == "es-MX") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Seleccione cualquier usuario</DIV>";
          }
          if (culture == "it-IT") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Wählen Sie beliebig Benutzer</DIV>";
          }
          if (culture == "de-DE") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Wählen Sie beliebig Benutzer</DIV>";
          }
          if (culture == "fr-FR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Sélectionnez quelconque utilisateur</DIV>";
          }
          if (culture == "ru-RU") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Выберите любой пользователь</DIV>";
          }
          if (culture == "pt-BR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>Selecione qualquer usuário</DIV>";
          }
          if (culture == "ja-JP") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>選択任意のユーザ</DIV>";
          }
          if (culture == "ko-KR") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>선택임의의 사용자</DIV>";
          }
          if (culture == "ar-SA") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>رتخا أي مستخدم</DIV>";
          }
          if (culture == "zh-CN") {
              document.getElementById(Msg).innerHTML = "<DIV style='color:Red'>选择任何用户</DIV>";
          }
          return false;
      }
  }

  function checkEndDate(sender, args) {


      var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
      var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleStartDate").value);
     
      if (sender._selectedDate < dt) {

         

          if (culture == "en-US") {
              alert('You cannot select a day less than start date!');
          }
          if (culture == "es-MX") {
              alert('No se puede seleccionar un día menos de la fecha de inicio!');
          }
          if (culture == "it-IT") {
              alert('Non è possibile selezionare un giorno inferiore a data di inizio!');
          }
          if (culture == "de-DE") {
              alert('Du kann nicht Wählen Sie pro Tag weniger als Beginn Datum!');
          }
          if (culture == "fr-FR") {
              alert('Tu ne peut pas sélectionner un jour moins que démarrer date!');
          }
          if (culture == "ru-RU") {
              alert('Вы не можете выбрать в день меньше, чем дата начала!');
          }
          if (culture == "pt-BR") {
              alert('Você não pode seleccionar um dia menos do que iniciar data!');
          }
          if (culture == "ja-JP") {
              alert('あなたことはできません選択1日より少ない〜よりも開始する日付！');
          }
          if (culture == "ko-KR") {
              alert('당신은하루의시작날짜를선택할수없습니다미만!');
          }
          if (culture == "ar-SA") {
              alert('لا يمكنك اختيار أقل من يوم واحد من تاريخ بدء!');
          }
          if (culture == "zh-CN") {
              alert('你不能选择一天不到开始日期！');
          }
          
          
          sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleStartDate").value);

          sender._textbox.set_Value(sender._selectedDate.format(sender._format))
      }
  }

  function checkStartDate(sender, args) {

      var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
      var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleEndDate").value);

      if (sender._selectedDate > dt) {

          

          if (culture == "en-US") {
              alert('You cannot select a day earlier than enddate!');
          }
          if (culture == "es-MX") {
              alert('No se puede seleccionar un día más temprano de  fecha de finalización!');
          }
          if (culture == "it-IT") {
              alert('Non è possibile selezionare un giorno anteriore rispetto fine data!');
          }
          if (culture == "de-DE") {
              alert('Du kann nicht Wählen Sie pro Tag früher als Ende Datum!');
          }
          if (culture == "fr-FR") {
              alert('Vous ne pouvez pas choisir un jour plus tôt que la date de fin!');
          }
          if (culture == "ru-RU") {
              alert('Вы не можете выбрать в день раньше, чем дата окончания!');
          }
          if (culture == "pt-BR") {
              alert('Você não pode seleccionar um dia anterior do que fim data!');
          }
          if (culture == "ja-JP") {
              alert('あなたことはできません1日以前の〜よりも終わり日付！');
          }
          if (culture == "ko-KR") {
              alert('선택하루이전보다끝날짜!');
          }
          if (culture == "ar-SA") {
              alert('أنت لا يمكن رتخا يوم واحد في وقت سابق على أن نهاية تاريخ!');
          }
          if (culture == "zh-CN") {
              alert('你不能选择日期早于结束日期！');
          }
          
          
          
          sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleEndDate").value);

          sender._textbox.set_Value(sender._selectedDate.format(sender._format))
      }
  }

  function checkEndDateEdit(sender, args) {


      var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
      var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleStartDateEdit").value);

      if (sender._selectedDate < dt) {

          //alert("You cannot select a day less than startdate!");
          if (culture == "en-US") {
              alert('You cannot select a day less than start date!');
          }
          if (culture == "es-MX") {
              alert('No se puede seleccionar un día menos de la fecha de inicio!');
          }
          if (culture == "it-IT") {
              alert('Non è possibile selezionare un giorno inferiore a data di inizio!');
          }
          if (culture == "de-DE") {
              alert('Du kann nicht Wählen Sie pro Tag weniger als Beginn Datum!');
          }
          if (culture == "fr-FR") {
              alert('Tu ne peut pas sélectionner un jour moins que démarrer date!');
          }
          if (culture == "ru-RU") {
              alert('Вы не можете выбрать в день меньше, чем дата начала!');
          }
          if (culture == "pt-BR") {
              alert('Você não pode seleccionar um dia menos do que iniciar data!');
          }
          if (culture == "ja-JP") {
              alert('あなたことはできません選択1日より少ない〜よりも開始する日付！');
          }
          if (culture == "ko-KR") {
              alert('당신은하루의시작날짜를선택할수없습니다미만!');
          }
          if (culture == "ar-SA") {
              alert('لا يمكنك اختيار أقل من يوم واحد من تاريخ بدء!');
          }
          if (culture == "zh-CN") {
              alert('你不能选择一天不到开始日期！');
          }
          sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleStartDateEdit").value);

          sender._textbox.set_Value(sender._selectedDate.format(sender._format))
      }
  }

  function checkStartDateEdit(sender, args) {

      var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
      var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleEndDateEdit").value);

      if (sender._selectedDate > dt) {

          //alert("You cannot select a day earlier than enddate!");

          if (culture == "en-US") {
              alert('You cannot select a day earlier than enddate!');
          }
          if (culture == "es-MX") {
              alert('No se puede seleccionar un día más temprano de  fecha de finalización!');
          }
          if (culture == "it-IT") {
              alert('Non è possibile selezionare un giorno anteriore rispetto fine data!');
          }
          if (culture == "de-DE") {
              alert('Du kann nicht Wählen Sie pro Tag früher als Ende Datum!');
          }
          if (culture == "fr-FR") {
              alert('Vous ne pouvez pas choisir un jour plus tôt que la date de fin!');
          }
          if (culture == "ru-RU") {
              alert('Вы не можете выбрать в день раньше, чем дата окончания!');
          }
          if (culture == "pt-BR") {
              alert('Você não pode seleccionar um dia anterior do que fim data!');
          }
          if (culture == "ja-JP") {
              alert('あなたことはできません1日以前の〜よりも終わり日付！');
          }
          if (culture == "ko-KR") {
              alert('선택하루이전보다끝날짜!');
          }
          if (culture == "ar-SA") {
              alert('أنت لا يمكن رتخا يوم واحد في وقت سابق على أن نهاية تاريخ!');
          }
          if (culture == "zh-CN") {
              alert('你不能选择日期早于结束日期！');
          }
          
          sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtVisibleEndDateEdit").value);
                
                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
        }

        //********************************(18/07/09)***********************************
        var checkflag = "false";
        function fnCheckUncheckAll(CheckBoxList) 
        {
            varTbody = document.getElementById(CheckBoxList).childNodes[0];

            tgname = varTbody.getElementsByTagName("INPUT");

            if (checkflag == "false") 
            {
                for (var i = 0; i < tgname.length; i++)
                 {
                    tgname[i].checked = true;
                }

                checkflag = "true";
            }
            else {
              for (i = 0; i < tgname.length; i++) {

                    tgname[i].checked = false;
                }
                checkflag = "false";
            }
        }


        /*****************************************************************************************/





        function checkEndDateEditMark(sender, args) {

            var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
            
            var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtBeginsEdit").value);

            if (sender._selectedDate < dt) {

                //alert("You cannot select a day less than startdate!");
                if (culture == "en-US") {
                    alert('You cannot select a day less than start date!');
                }
                if (culture == "es-MX") {
                    alert('No se puede seleccionar un día menos de la fecha de inicio!');
                }
                if (culture == "it-IT") {
                    alert('Non è possibile selezionare un giorno inferiore a data di inizio!');
                }
                if (culture == "de-DE") {
                    alert('Du kann nicht Wählen Sie pro Tag weniger als Beginn Datum!');
                }
                if (culture == "fr-FR") {
                    alert('Tu ne peut pas sélectionner un jour moins que démarrer date!');
                }
                if (culture == "ru-RU") {
                    alert('Вы не можете выбрать в день меньше, чем дата начала!');
                }
                if (culture == "pt-BR") {
                    alert('Você não pode seleccionar um dia menos do que iniciar data!');
                }
                if (culture == "ja-JP") {
                    alert('あなたことはできません選択1日より少ない〜よりも開始する日付！');
                }
                if (culture == "ko-KR") {
                    alert('당신은하루의시작날짜를선택할수없습니다미만!');
                }
                if (culture == "ar-SA") {
                    alert('لا يمكنك اختيار أقل من يوم واحد من تاريخ بدء!');
                }
                if (culture == "zh-CN") {
                    alert('你不能选择一天不到开始日期！');
                }
                
                
                
                sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtBeginsEdit").value);

                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
        }

        function checkStartDateEditMark(sender, args) {

            var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
            
            var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtEndsEdit").value);

            if (sender._selectedDate > dt) {

                //alert("You cannot select a day earlier than enddate!");

                if (culture == "en-US") {
                    alert('You cannot select a day earlier than enddate!');
                }
                if (culture == "es-MX") {
                    alert('No se puede seleccionar un día más temprano de  fecha de finalización!');
                }
                if (culture == "it-IT") {
                    alert('Non è possibile selezionare un giorno anteriore rispetto fine data!');
                }
                if (culture == "de-DE") {
                    alert('Du kann nicht Wählen Sie pro Tag früher als Ende Datum!');
                }
                if (culture == "fr-FR") {
                    alert('Vous ne pouvez pas choisir un jour plus tôt que la date de fin!');
                }
                if (culture == "ru-RU") {
                    alert('Вы не можете выбрать в день раньше, чем дата окончания!');
                }
                if (culture == "pt-BR") {
                    alert('Você não pode seleccionar um dia anterior do que fim data!');
                }
                if (culture == "ja-JP") {
                    alert('あなたことはできません1日以前の〜よりも終わり日付！');
                }
                if (culture == "ko-KR") {
                    alert('선택하루이전보다끝날짜!');
                }
                if (culture == "ar-SA") {
                    alert('أنت لا يمكن رتخا يوم واحد في وقت سابق على أن نهاية تاريخ!');
                }
                if (culture == "zh-CN") {
                    alert('你不能选择日期早于结束日期！');
                }
          
                
                
                sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtEndsEdit").value);

                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
        }



        function checkEndDateMark(sender, args) {

            var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
           

            var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtBegins").value);

            if (sender._selectedDate < dt) {

                //alert("You cannot select a day less than startdate!");

                if (culture == "en-US") {
                    alert('You cannot select a day less than start date!');
                }
                if (culture == "es-MX") {
                    alert('No se puede seleccionar un día menos de la fecha de inicio!');
                }
                if (culture == "it-IT") {
                    alert('Non è possibile selezionare un giorno inferiore a data di inizio!');
                }
                if (culture == "de-DE") {
                    alert('Du kann nicht Wählen Sie pro Tag weniger als Beginn Datum!');
                }
                if (culture == "fr-FR") {
                    alert('Tu ne peut pas sélectionner un jour moins que démarrer date!');
                }
                if (culture == "ru-RU") {
                    alert('Вы не можете выбрать в день меньше, чем дата начала!');
                }
                if (culture == "pt-BR") {
                    alert('Você não pode seleccionar um dia menos do que iniciar data!');
                }
                if (culture == "ja-JP") {
                    alert('あなたことはできません選択1日より少ない〜よりも開始する日付！');
                }
                if (culture == "ko-KR") {
                    alert('당신은하루의시작날짜를선택할수없습니다미만!');
                }
                if (culture == "ar-SA") {
                    alert('لا يمكنك اختيار أقل من يوم واحد من تاريخ بدء!');
                }
                if (culture == "zh-CN") {
                    alert('你不能选择一天不到开始日期！');
                }
                
                sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtBegins").value);

                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
        }

        function checkStartDateMark(sender, args) {

            var culture = document.getElementById("ctl00_ContentPlaceHolder1_hdns").value;
            
            var dt = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtEnds").value);

            if (sender._selectedDate > dt) {

                //alert("You cannot select a day earlier than enddate!");

                if (culture == "en-US") {
                    alert('You cannot select a day earlier than enddate!');
                }
                if (culture == "es-MX") {
                    alert('No se puede seleccionar un día más temprano de  fecha de finalización!');
                }
                if (culture == "it-IT") {
                    alert('Non è possibile selezionare un giorno anteriore rispetto fine data!');
                }
                if (culture == "de-DE") {
                    alert('Du kann nicht Wählen Sie pro Tag früher als Ende Datum!');
                }
                if (culture == "fr-FR") {
                    alert('Vous ne pouvez pas choisir un jour plus tôt que la date de fin!');
                }
                if (culture == "ru-RU") {
                    alert('Вы не можете выбрать в день раньше, чем дата окончания!');
                }
                if (culture == "pt-BR") {
                    alert('Você não pode seleccionar um dia anterior do que fim data!');
                }
                if (culture == "ja-JP") {
                    alert('あなたことはできません1日以前の〜よりも終わり日付！');
                }
                if (culture == "ko-KR") {
                    alert('선택하루이전보다끝날짜!');
                }
                if (culture == "ar-SA") {
                    alert('أنت لا يمكن رتخا يوم واحد في وقت سابق على أن نهاية تاريخ!');
                }
                if (culture == "zh-CN") {
                    alert('你不能选择日期早于结束日期！');
                }
                
                sender._selectedDate = new Date(document.getElementById("ctl00_ContentPlaceHolder1_txtEnds").value);

                sender._textbox.set_Value(sender._selectedDate.format(sender._format))
            }
        }
